package com.example.test.entity;



public class Pair2 {






    public static void minmaxBonus(Manager[]a, Pair<? super Manager> result){
        if (a.length == 0) return;
        Manager min = a[0];
        Manager max = a[1];
        for (int i =1 ;i<a.length;i++){
            if (min.getBonus()>a[i].getBonus()) min = a[i];
            if(max.getBonus()<a[i].getBonus()) max = a[i];
        }
        result.setFirst(min);
        result.setSecond(max);
    }
}
